Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Adapter: Admatic #3654

Merged
merged 46 commits into from
Jul 3, 2024
Merged

New Adapter: Admatic #3654

merged 46 commits into from
Jul 3, 2024

Conversation

bakicam
Copy link
Contributor

@bakicam bakicam commented May 2, 2024

We added s2s support for Admatic.

Docs PR: prebid/prebid.github.io#5232

Old Pull Request reference: #3608

@farukcam farukcam mentioned this pull request May 2, 2024
@SyntaxNode
Copy link
Contributor

The validation tests are failing because you need to format your code go fmt.

@bakicam
Copy link
Contributor Author

bakicam commented May 2, 2024

The validation tests are failing because you need to format your code go fmt.
@SyntaxNode
Hello,
go fmt was done. Can you check?

@bakicam
Copy link
Contributor Author

bakicam commented May 7, 2024

Hi,
We need for your support.

@onkarvhanumante
Copy link
Contributor

onkarvhanumante commented May 13, 2024

Hi, We need for your support.

@bakicam to merge Prebid:master changes into Admatic-Sofware:master and update MakeRequests to return ImpIDs as mentioned below

headers.Add("Content-Type", "application/json;charset=utf-8")
headers.Add("Accept", "application/json")
return []*adapters.RequestData{{
Method: "POST",
Uri: a.URI,
Body: reqJSON,
Headers: headers,
ImpIDs: openrtb_ext.GetImpIDs(request.Imp),

@bakicam
Copy link
Contributor Author

bakicam commented May 14, 2024

Hello @onkarvhanumante ,
We made the solution.

@farukcam
Copy link
Contributor

Hi @onkarvhanumante,
We need for your support.

@onkarvhanumante
Copy link
Contributor

Hi @onkarvhanumante, We need for your support.

Refer #3654 (comment) to fix PR tests. let me know if any other support is needed

--- FAIL: TestJsonSamples (0.00s)
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:1[28](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:29)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:5[35](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:36)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/exemplary/banner.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:[41](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:42)2
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:[44](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:45)5
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/exemplary/native.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:4[45](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:46)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:[46](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:47)7
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/exemplary/optional-params.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:[53](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:54)5
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/exemplary/video.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:2[56](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:57)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/supplemental/response-200-without-body.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:76
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:4[67](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:68)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:[70](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:71)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/supplemental/response-204.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]
    test_json.go:128: 
        	Error Trace:	/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:256
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:412
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:128
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:99
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:[76](https://github.com/prebid/prebid-server/actions/runs/9075060288/job/24934940735?pr=3654#step:5:77)
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:445
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:467
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/path.go:535
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/test_json.go:70
        	            				/home/runner/work/prebid-server/prebid-server/adapters/admatic/admatic_test.go:20
        	Error:      	Received unexpected error:
        	            	expected.ImpIDs must contain at least one imp ID
        	Test:       	TestJsonSamples
        	Messages:   	admatictest/supplemental/server-error.json Expected RequestData was not returned by adapters' MakeRequests() implementation: httpRequest[0]

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, f6caf06

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:22:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:34:	MakeRequests		70.6%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:74:	getImpressionExt	71.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:93:	resolveUrl		75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:109:	MakeBids		100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:135:	getMediaTypeForBid	88.9%
total:									(statements)		81.0%

@bakicam
Copy link
Contributor Author

bakicam commented May 23, 2024

Hi @onkarvhanumante,
We fixed all problems. We need for your support.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 6198a7b

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:22:	Builder			80.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:34:	MakeRequests		70.6%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:74:	getImpressionExt	71.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:93:	resolveUrl		75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:109:	MakeBids		93.3%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:140:	getMediaTypeForBid	88.9%
total:									(statements)		80.3%

static/bidder-params/admatic.json Outdated Show resolved Hide resolved
adapters/admatic/params_test.go Outdated Show resolved Hide resolved
adapters/admatic/admatic.go Outdated Show resolved Hide resolved
adapters/admatic/admatic.go Outdated Show resolved Hide resolved
adapters/admatic/admatic.go Show resolved Hide resolved
adapters/admatic/admatic.go Outdated Show resolved Hide resolved
adapters/admatic/admatic.go Show resolved Hide resolved
static/bidder-params/admatic.json Show resolved Hide resolved
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 3dced1b

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:21:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:33:	MakeRequests			75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:66:	buildEndpointFromRequest	75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:88:	MakeBids			94.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:123:	getMediaTypeForBid		88.9%
total:									(statements)			85.7%

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, fa1bbba

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:21:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:33:	MakeRequests			75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:66:	buildEndpointFromRequest	75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:88:	MakeBids			94.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:123:	getMediaTypeForBid		88.9%
total:									(statements)			85.7%

@bakicam
Copy link
Contributor Author

bakicam commented Jun 29, 2024

Hi,
We fixed all problems. Can you check again?

adapters/admatic/params_test.go Show resolved Hide resolved
adapters/admatic/admatic_test.go Outdated Show resolved Hide resolved
adapters/admatic/admatic.go Show resolved Hide resolved
Copy link

github-actions bot commented Jul 2, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, c2655e5

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:21:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:33:	MakeRequests			75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:66:	buildEndpointFromRequest	75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:88:	MakeBids			94.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:123:	getMediaTypeForBid		88.9%
total:									(statements)			85.7%

Copy link

github-actions bot commented Jul 2, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 5fc719d

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:21:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:33:	MakeRequests			75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:66:	buildEndpointFromRequest	75.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:88:	MakeBids			94.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:123:	getMediaTypeForBid		88.9%
total:									(statements)			85.7%

@bakicam
Copy link
Contributor Author

bakicam commented Jul 2, 2024

Hi,
We fixed problems. Can you check again?

@bsardo
Copy link
Collaborator

bsardo commented Jul 2, 2024

@bakicam the last comment that needs resolution from my POV is #3654 (comment).

Copy link

github-actions bot commented Jul 2, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 9d10bdd

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:21:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:33:	MakeRequests			87.5%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:66:	buildEndpointFromRequest	87.5%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:88:	MakeBids			94.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:123:	getMediaTypeForBid		88.9%
total:									(statements)			91.1%

Copy link

github-actions bot commented Jul 2, 2024

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, d20bbb8

admatic

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:21:	Builder				100.0%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:33:	MakeRequests			87.5%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:66:	buildEndpointFromRequest	87.5%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:88:	MakeBids			94.4%
github.com/prebid/prebid-server/v2/adapters/admatic/admatic.go:123:	getMediaTypeForBid		88.9%
total:									(statements)			91.1%

@bakicam
Copy link
Contributor Author

bakicam commented Jul 3, 2024

Hi,
Do we need to do anything for it to merge?

@onkarvhanumante onkarvhanumante merged commit 99431ad into prebid:master Jul 3, 2024
5 checks passed
mefjush pushed a commit to adhese/prebid-server that referenced this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants